@@ -63,7 +63,7 @@ public static Direction getDirection(@Nonnull final JID owner, @Nonnull final JI
63
63
@ Nullable
64
64
private final String body ;
65
65
66
- @ Nullable
66
+ @ Nonnull
67
67
private final JID with ;
68
68
69
69
@ Nullable
@@ -72,7 +72,7 @@ public static Direction getDirection(@Nonnull final JID owner, @Nonnull final JI
72
72
@ Nullable
73
73
private final String stableId ;
74
74
75
- public ArchivedMessage (@ Nullable final Long id , @ Nonnull final Date time , @ Nonnull final Direction direction , @ Nullable final JID with , @ Nullable final String stableId , @ Nullable final String body , @ Nullable final String stanza ) throws DocumentException {
75
+ public ArchivedMessage (@ Nullable final Long id , @ Nonnull final Date time , @ Nonnull final Direction direction , @ Nonnull final JID with , @ Nullable final String stableId , @ Nullable final String body , @ Nullable final String stanza ) throws DocumentException {
76
76
this .id = id ;
77
77
this .time = time ;
78
78
this .direction = direction ;
@@ -154,12 +154,12 @@ public Message getStanza() {
154
154
* The message peer (the 'other side' of the conversation), in respect to the owner of the archive that this message
155
155
* is part of.
156
156
*
157
- * This value will only have meaning when the original message was sent in a one-to-one conversation. When the
158
- * archived message was originally shared in a group chat, this value can be null .
157
+ * When the archived message was originally shared in a group chat, this value will reference the in-room address
158
+ * of the participant that sent the message (eg: room@service/nickname) .
159
159
*
160
160
* @return The conversation peer.
161
161
*/
162
- @ Nullable
162
+ @ Nonnull
163
163
public JID getWith () {
164
164
return with ;
165
165
}
@@ -224,8 +224,8 @@ public static Message recreateStanza( @Nonnull final ArchivedMessage archivedMes
224
224
from = archivedMessage .getWith ();
225
225
}
226
226
227
- final boolean isMuc = ( to != null && XMPPServer .getInstance ().getMultiUserChatManager ().getMultiUserChatService ( to ) != null )
228
- || ( from != null && XMPPServer .getInstance ().getMultiUserChatManager ().getMultiUserChatService ( from ) != null ) ;
227
+ final boolean isMuc = XMPPServer .getInstance ().getMultiUserChatManager ().getMultiUserChatService ( to ) != null
228
+ || XMPPServer .getInstance ().getMultiUserChatManager ().getMultiUserChatService ( from ) != null ;
229
229
230
230
final Message result = new Message ();
231
231
result .setFrom (from );
0 commit comments